﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace Tss.MagicWeb.Domain.Decks
{
    public class DeckValidationResult
    {
        public bool Valid { get; set; }
        public List<String> ErrorMessages { get; set; }

        public DeckValidationResult()
        {
            ErrorMessages = new List<string>();
        }

        public DeckValidationResult(List<String> messages)
        {
            ErrorMessages = messages ?? new List<string>();
            Valid = messages == null || messages.All(m => String.IsNullOrEmpty(m));
        }
    }
}
